package pl.accuratus.exmore.client.spi;

import java.lang.annotation.Annotation;

import com.google.gwt.user.client.rpc.AsyncCallback;

public abstract class ExtensionMetaData<T extends Annotation> {

	protected T extensionAnnotation;

	// protected List<Annotation> annotations = new ArrayList<Annotation>();

	public ExtensionMetaData(T extensionAnnotation) {// ,
														// Annotation...annotations)
														// {
		this.extensionAnnotation = extensionAnnotation;
		// this.annotations = Arrays.asList(annotations);
	}

	public T getExtensionAnnotation() {
		return extensionAnnotation;
	}

	// public Set<Annotation> getAnnotations(){
	// return new HashSet<Annotation>(annotations);
	// }

	public abstract <C> C create();

	public abstract <C> void createAsync(final AsyncCallback<C> callback);

}